3 Solution to problem: 562 - Dividing coins
4 (From the UVa Online Judge
5 http://icpcres.ecs.baylor.edu/onlinejudge/
8 Author: Andres Mejia-Posada
9 http://blogaritmo.factorcomun.org
23 for (int i
=0; i
<c
; ++i
){
29 for (int d
=0; d
<=s
; ++d
)
36 for (int i
=1; i
<c
; ++i
)
37 for (int d
=0; d
<=s
; ++d
){
38 dp
[i
][d
] = dp
[i
-1][abs(d
- m
[i
])];
40 dp
[i
][d
] |= dp
[i
-1][d
+ m
[i
]];
43 for (int d
=0; d
<=s
; ++d
)